home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / windows4 / pcproj.zip / MILESTON.CLS < prev    next >
Text File  |  1988-11-30  |  1KB  |  60 lines

  1. /* A Milestone marks the completion of significant tasks.
  2.    Milestones do not consume resources or take time. 
  3.    Milestones are used whenever a path must split or
  4.    join.
  5.  
  6.    Milestones descend from Activity and inherit all of
  7.    their methods and instance variables.
  8. */!!
  9.  
  10. inherit(Activity, #Milestone, nil, 2, nil)!!
  11.  
  12. now(MilestoneClass)!!
  13.  
  14. now(Milestone)!!
  15.  
  16. /* Return the class name.  Uses resources for translation. */
  17. Def className(self)
  18. {
  19.   ^loadString(PW_MILESTONE);
  20. }!!
  21.  
  22. /* Draw a Milestone at a location in a window.
  23.    The window manages the details of what the
  24.    Milestone will look like, since it could be
  25.    a PERT chart or a Gantt chart. */
  26. Def  draw(self, window, x, y, hDC)
  27.   drawMilestone(window, self, x, y, hDC);
  28. }!!
  29.  
  30. /* Return the appropriate dialog class to be used
  31.    by editInfo(). */
  32. Def  dialogClass(self)
  33. {
  34.   ^MStoneDialog;
  35. }!!
  36.  
  37. /* Milestones don't have a cost, but should respond to the message. */
  38. Def  getCost(self)
  39. { ^0;
  40. }!!
  41.  
  42. /* Milestones don't have resources, but should respond to the message. */
  43. Def  getResources(self)
  44. {
  45.  errorBox("getResources","Milestone:"+name);
  46.  ^nil;
  47. }!!
  48.  
  49. /* Milestones don't have a cost, but should respond to the message. */
  50. Def  calcCost(self)
  51. { ^0;
  52. }!!
  53.  
  54. /* Milestones don't have a time, but should respond to the message. */
  55. Def  getTime(self)
  56. { ^0;
  57. }!!
  58.  
  59.